package com.mouliu.base;

import java.util.HashSet;
import java.util.Set;

/**
 * @author mouliu
 * @create 2018-03-31-下午4:54
 */
public class test {
    private static final int MAXIMUM_CAPACITY = 1 << 30;
    public static void main(String[] args){
        /*System.out.println(MAXIMUM_CAPACITY);
        System.out.println(MAXIMUM_CAPACITY >>> 1);

        int size = 6;
        System.out.println(size>>>1);

        int k = tableSizeFor(size + (size >>> 1) + 1);
        System.out.println(k);*/
        Set<String[]> extraSet = new HashSet<>();
        for (int i=0;i<3;i++){
            String[] appStr = new String[]{i+"",i+"ii",i+"iii"};
            extraSet.add(appStr);
        }
        System.out.println(extraSet.size());
    }


    private static final int tableSizeFor(int c) {
        int n = c - 1;
        n |= n >>> 1;
        n |= n >>> 2;
        n |= n >>> 4;
        n |= n >>> 8;
        n |= n >>> 16;
        return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1;
    }
}
